package com.cybertron.ironhide.search.common.ftl;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.servlet.view.freemarker.FreeMarkerView;

import com.cybertron.ironhide.search.common.Constants;

public class RichFreeMarkerView extends FreeMarkerView {

	public static final String CONTEXT_PATH = "base";

	public static final String RESOURCE_ROOT_URL = "resourceRootUrl";

	@Override
	protected void exposeHelpers(Map<String, Object> model,
			HttpServletRequest request) throws Exception {
		super.exposeHelpers(model, request);
		model.put(CONTEXT_PATH, request.getContextPath());
		model.put(RESOURCE_ROOT_URL, Constants.RESOURCE_ROOT_URL);
	}
}
